"""
结算页面方法
"""
from common.base import Base, get_driver
from selenium.webdriver.common.by import By


class SettleAccountPage(Base):
    # 点击结算
    def click_settle_accounts(self):
        self.click((By.XPATH, '//img[@src="themes/default/images/checkout.gif"]'))


if __name__ == '__main__':
    # 创建浏览器对象
    driver = get_driver()
    settle_account = SettleAccountPage(driver)
    # 访问目标网址
    settle_account.get('http://localhost:8080/ecshop/flow.php?step=cart')
    settle_account.click_settle_accounts()
    settle_account.quit(2)
